package com.ruoyi.project.person.invite.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.person.invite.domain.Invite;
import com.ruoyi.project.person.invite.service.PersonInviteService;
import com.ruoyi.project.system.user.domain.User;
import com.ruoyi.project.system.user.service.IUserService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 招聘管理控制类
 */
@Controller
@RequestMapping("/person/invite")
public class PersonInviteController extends BaseController {

    @Autowired
    private PersonInviteService personInviteService;
    private String prefix = "person/invite";

    @RequiresPermissions("person:invite:view")
    @GetMapping()
    public String invite()
    {
        return prefix + "/invite";
    }


    /**
     * 查询招聘信息
     * @param invite
     * @return
     */
    @RequiresPermissions("person:invite:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(Invite invite)
    {
        startPage();
        List<Invite> list = personInviteService.selectinviteList(invite);
        return getDataTable(list);
    }
}
